Develop - #144
Merged
Merged
Conversation
fix(): set-env issue
feat(): implement e2e test
The CLI-playground tests use ESM module mocking (jest.unstable_mockModule + top-level await) and load the ESM-only @acurast/sdk. Run jest with --experimental-vm-modules and compile tests via an esnext/bundler tsconfig so top-level await compiles and package exports subpaths resolve.
# Conflicts: # package.json
- Global login at ~/.acurast/auth.json shared across projects, with an optional per-project pin at ./.acurast/auth.json that overrides it. - Signing-mode resolution: env force > project pin > mnemonic > global login. - init asks how to sign (default browser wallet); browser mode writes no mnemonic and offers to log in inline. - login --project; logout --project/--all; whoami shows account source. - deploy prints a visible signing notice, explicit about local-mnemonic use. - Extract ensureDirectoryExistence to break the constants<->storeDeployment import cycle (surfaced under ESM tests).
…utable - Remove unref() on the login callback server: login awaits the callback with no other active handle, so an unref'd socket let the process exit instantly and the browser hit ECONNREFUSED. The listening socket now keeps the CLI alive until close() runs in login's finally. - build: chmod dist/index.js to 0755 so tsc overwriting it doesn't strip the bin's execute bit (npm i -g relinks but won't re-chmod on 'up to date').
Chromium tags the hub's https->http login redirect as Sec-Fetch-Site: cross-site, which the same-origin guard rejected with 403. Allow top-level navigations (Sec-Fetch-Mode: navigate / Sec-Fetch-Dest: document) — the per-session token is the CSRF defense there — while still blocking cross-site fetches to /payload and /result.
…ompt - init only asks the signing-method question in the greenfield path and only when stdin is a TTY; the existing-json path and non-tty runs fall back to the local mnemonic (legacy behaviour), so `acurast init` on an existing project no longer blocks waiting for input. - init.exp answers the new signing-method select (picks Local mnemonic) so the wizard writes ACURAST_MNEMONIC as the e2e scenarios expect.
feat(): implement cli playground
Deploy an SSH-able VPS on a processor without an acurast.json: vendors the app-tunnel/cargo example (Shell runtime, dropbear over the Acurast reverse tunnel) as a CLI-shipped template and synthesizes the project config from flags, VPS_* env vars, or an interactive wizard (precedence in that order). - extract executeDeployFlow from the deploy action so both commands share signer/balance/pricing/submission logic - enable positional options so flags shared with `deploy` (--dry-run, --min-memory, ...) reach the subcommand - image aliases: ubuntu24 (noble, default) / ubuntu25 (questing), pinned proot-distro tarballs with sha256 - SSH auth: password and/or authorized key (SSH_AUTHORIZED_KEY written to authorized_keys by the template's start.sh)
DevTools log forwarding only works for NodeJS runtimes — the Shell (cargo) runtime has no snippet to inject, so the post-deploy hint was misleading. Since the tunnel hostname is generated on the processor and there is no remote log access, a missing callback URL makes the SSH connect command unrecoverable: warn, and in interactive mode require confirmation before deploying without one.
executeDeployFlow decided whether to wait for EnvironmentVariablesSet by checking config.includeEnvironmentVariables. `deploy vps` passes env vars directly without listing them there, so the CLI exited right after processor acknowledgement — killing the SDK's in-flight setEnvVars submission. The processor never received NETWORK / SSH_PASSWORD / CALLBACK_URL and the tunnel app aborted on startup.
Wizard answers are written as VPS_* variables (existing lines updated, rest of the file preserved), so subsequent runs pre-fill from the environment and skip the questions. Prompt only appears when the wizard actually asked something.
The non-interactive benchmark gate returned before the dry-run exit, so `--dry-run --non-interactive` with filters never printed "Dry run, not deploying" (e2e scenario 07 failure). A dry run submits nothing — skip the abort.
feat(deploy): add `deploy vps` command
Release/v0.10.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.